<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  watch: {
    $route (to, from) {
      this.setpathRoute(this.$route.path)
    },
    logoImage (val) {
      var link = document.querySelector("link[rel*='icon']") || document.createElement('link')
      link.type = 'image/x-icon'
      link.rel = 'shortcut icon'
      link.href = val
      document.getElementsByTagName('head')[0].appendChild(link)
    }
  },
  methods: {
  },
  created () {
    if (this.getCookie('pk')) {
      sessionStorage.setItem('userId', this.getCookie('pk') || '')
      sessionStorage.setItem('wxId', this.getCookie('wxId') || '')
      sessionStorage.setItem('uId', this.getCookie('userid') || '')
      sessionStorage.setItem('wxCode', this.getCookie('wx_code') || '')
    }
    this.setPcLogo({system: 'MedChat', image: 'assets/img/artical1.png'})
    // // 获取oss配置（主要用于百度编辑器）
    // this.setOssInfo()
  }
  /* eslint-disable */
  // children = [
  //   {
  //     path: '/home/cp/manage/data/corp',
  //     menuName: '企业概况',
  //     children: [
  //       {
  //         path: '/home/cp/manage/data/corp/info',
  //         menuName: '企业成员概括'
  //       },
  //       {
  //         path: '/home/cp/manage/data/corp/use',
  //         menuName: '成员使用统计'
  //       },
  //       {
  //         path: '/home/cp/manage/data/corp/activity',
  //         menuName: '成员活跃度'
  //       }
  //     ]
  //   },
  //   {
  //     path: '/home/cp/manage/data/app',
  //     menuName: '应用数据',
  //     children: [
  //       {
  //         path: '/home/cp/manage/data/app/subscribe',
  //         menuName: '应用关注情况'
  //       },
  //       {
  //         path: '/home/cp/manage/data/app/use',
  //         menuName: '成员使用分析'
  //       }
  //     ]
  //   }
  // ]
  /* eslint-disable */
}
</script>

<style lang="stylus" scoped>
  #app
    width 100%
    height 100%
    background-color #fff
    overflow auto
    min-width 1360px
</style>
